Imports CapaDeDatos
Public Class nDetalleRecibo
    Private DetalleRecibo As dDetalleRecibo = New dDetalleRecibo()
    Private Factura As CapaDeNegocios.nFactura = New CapaDeNegocios.nFactura
    Public Function Insertar(ByVal idRecibo As String, ByVal idFactura As String) As Boolean
        Return DetalleRecibo.Insertar(idRecibo, idFactura)
    End Function
    Public Function Eliminar(ByVal idRecibo As String, ByVal idDetalleRecibo As String) As Boolean
        Return DetalleRecibo.Eliminar(idRecibo, idDetalleRecibo)
    End Function
    Public Function BuscarFiltrado(ByVal idDetalleRecibo As String, ByVal idRecibo As String, ByVal idFactura As String) As DataSet
        Dim dts As DataSet = DetalleRecibo.BuscarFiltrado(idDetalleRecibo, idRecibo, idFactura)
        dts.Tables(0).Columns.Add("Factura")
        Dim i As Integer
        For i = 0 To dts.Tables(0).Rows.Count - 1
            Try
                dts.Tables(0).Rows(i)("Factura") = Factura.BuscarFiltrado(dts.Tables(0).Rows(i)("IdFactura").ToString(), "", "", "", "", "", "", "", "", "").Tables(0).Rows(0)("Numero").ToString()
            Catch ex As Exception
                dts.Tables(0).Rows(i)("Factura") = "Error, Factura no Encontrada"
            End Try
        Next
        Return dts

    End Function
End Class
